package com.apache.bid.controller.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.apache.bid.controller.BaseSupperAction;
import com.apache.bid.entity.BidVariety;
import com.apache.bid.manager.BidVarietyManager;
import com.apache.bid.manager.UnityBaseManager;

@Controller
@RequestMapping("/admin/variety")
public class BidVarietyAction extends BaseSupperAction<BidVariety> {

	@Autowired
	private BidVarietyManager bidVarietyManager;

	@Override
	protected UnityBaseManager<BidVariety> getBaseManager() {
		return bidVarietyManager;
	}
	
	@Override
	protected String getCommBoxValue(BidVariety item, String type) {
		if ("id".equals(type)) {
			return item.getVarietyCode();
		} else {
			return item.getVarietyName();
		}
	}

}
